package com.example.main.beans;

import android.graphics.Bitmap;

import com.example.main.utils.MatrixZxingUtil;
import com.google.zxing.WriterException;

import java.io.Serializable;

public class BarcodeInfoBean implements Serializable {
    private String content;
    private Bitmap bitmap;
    private String name;

    public BarcodeInfoBean(String content, String name) {
        this.content = content;
        this.name = name;
        try {
            bitmap = MatrixZxingUtil.createQRCode(String.valueOf(content), 500, 150);
        } catch (WriterException e) {
            e.printStackTrace();
        }
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Bitmap getBitmap() {
        return bitmap;
    }

    public void setBitmap(Bitmap bitmap) {
        this.bitmap = bitmap;
    }
}
